<template>
	<view>
		<view class="bg-light fixed-top">
			<!-- <view class="bg-light" :class="fixed?'fixed-top':''"> -->
			<view :style="'height:'+statusBarHeight+'px'"></view>
			<view class="w-100 flex align-center justify-between" style="height: 90rpx;">
				<view class="flex align-center">
					<view v-if="title" class="font-md m-3 ml-3">
						<slot name="title"></slot>
					</view>
				</view>
				<view class="flex align-center justify-between">
					<!-- <view class="flex align-center justify-center border" style="width: 90rpx;height: 90rpx;" hover-class="bg-hover-light">
						<text class="iconfont mr-2 font-md">&#xeffa;</text>
					</view>
					<view class="flex align-center justify-center border" style="width: 90rpx;height: 90rpx;" hover-class="bg-hover-light">
						<text class="iconfont mr-2 font-md">&#xeffa;</text>
					</view> -->
					<free-icon-buttom><template slot="buttomIcon">
							<view hover-class="bg-hover-light" class="flex align-center justify-center "
								style="width: 90rpx;height: 90rpx;"><text class="iconfont mr-2 font-md">&#xeffa;</text>
							</view>
						</template></free-icon-buttom>
					<free-icon-buttom><template slot="buttomIcon">
							<view hover-class="bg-hover-light" class="flex align-center justify-center"
								style="width: 90rpx;height: 90rpx;"><text class="iconfont font-md">&#xe618;</text>
							</view>
						</template></free-icon-buttom>
				</view>
			</view>
			<!-- </view> -->

		</view>
		<view v-if="fixed" :style="fixedStyle"></view>
	</view>
</template>

<script>
	import freeIconButtom from "./free-icon-buttom.vue";
	export default {
		props: {
			title: {
				type: Boolean,
				default: false
			},
			fixed: {
				type: Boolean,
				default: true
			}
		},
		components: {
			freeIconButtom
		},
		data() {
			return {
				statusBarHeight: 0,
				navBarHeight: 0
			}
		},
		mounted() {
			//适配手机状态栏的高度
			// #ifdef APP-PLUS-NVUE
			this.statusBarHeight = plus.navigator.getStatusbarHeight();
			// #endif
			this.navBarHeight = this.statusBarHeight + uni.upx2px(90);


		},
		computed: {
			fixedStyle() {
				return `height:${this.navBarHeight}px`
			}
		}
	}
</script>

<style>
</style>
